import request from '@/utils/request'

export function getGoodsList (params) {
  return request({
    url: '/api/goods/list',
    method: 'get',
    params
  })
}

export function addGoods (data) {
  return request({
    url: '/api/goods/add',
    method: 'post',
    data
  })
}

export function updateGoods (data) {
  return request({
    url: '/api/goods/update',
    method: 'post',
    data
  })
}

export function deleteGoods (id) {
  return request({
    url: '/api/goods/delete',
    method: 'post',
    data: { id }
  })
}